<{include file="admin/head.html"}>
<link rel="stylesheet" href="<{$smarty.const.__URL__}>plugins/ueditor/themes/default/ueditor.css"/>
<script type="text/javascript">
	URL = "<{$smarty.const.__URL__}>plugins/ueditor/";
</script>
<body>
	<{include file="admin/nav.html"}>
	<div id="content">
		<div id="sidebar">
			<ul>
				<{foreach from=$cats item=c}>
				<li><a href="article.php?do=list&cid=<{$c.id}>"><{$c.name}></a></li>
				<li><a href="article.php?do=add&cid=<{$c.id}>">添加<{$c.name}></a></li>
				<{/foreach}>
			</ul>
		</div>
		<div id="main">
			<h2 id="page_title"><{$pageTitle}></h2>
			<form action="article.php" method="post" enctype="multipart/form-data">
				<table class="form_table">
					<tr>
						<td>标题<span class="required">*</span></td>
						<td><input type="text" name="title" value="<{$artinfo.title}>" style="width:320px;"></td>
					</tr>
					<tr>
						<td valign="middle">摘要</td>
						<td><textarea name="abstract" id="abstract"><{$artinfo.abstract}></textarea></td>
					</tr>
					<tr>
						<td valign="middle">内容</td>
						<td><textarea name="content" id="desc"><{$artinfo.content}></textarea></td>
					</tr>
					
					<tr>
						<td valign="middle">广告图</td>
						<td>
							<ul id="file_list"></ul>
							<input type="file" name="advpic">
						</td>
					</tr>
					<tr>
						<td valign="middle">广告图链接</td>
						<td><input type="text" name="link" style="width:480px;"></td>
					</tr>
					<tr>
						<td valign="middle">title</td>
						<td><input name="titles" id="titles" value="<{$artinfo.titles}>" style="width:480px;"></td>
					</tr>
					<tr>
						<td valign="middle">keywords</td>
						<td><input name="keywords" id="keywords" value="<{$artinfo.keywords}>" style="width:480px;"></td>
					</tr>
					<tr>
						<td valign="middle">descrition</td>
						<td><input name="descriptions" id="descriptions" value="<{$artinfo.descriptions}>" style="width:480px;"></td>
					</tr>
				</table>
				<p>
					<input type="submit" value="提交" name="submit">
					<input type="hidden" name="do" value="<{$do|default:'addArt'}>">
					<input type="hidden" name="category" value="<{$cid|default:'1'}>">
					<{if $artinfo.id}>
						<input type="hidden" name="id" value="<{$artinfo.id}>">
					<{/if}>
				</p>
			</form>
		</div>
	</div>
	<script type="text/javascript" src="<{$smarty.const.__URL__}>plugins/ueditor/editor_config.js"></script>
	<script type="text/javascript" src="<{$smarty.const.__URL__}>plugins/ueditor/editor_all_min.js"></script>	
	<script type="text/javascript">
		var editor1 = new baidu.editor.ui.Editor();
		editor1.render("desc");
		var editor2 = new baidu.editor.ui.Editor({
			minFrameHeight: 120,
			maximumWords:1000,
		});
		editor2	.render("abstract");
		function successCallback(){

		}
	</script>
</body>
</html>